<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main.xhtml">

	<ui:define name="body">
		<h:form id="meuForm">
			<p:dataTable id="list" var="bean" value="#{curvaABCProdutoMB.dadosCurvaABC}"
				lazy="true" paginator="false"
				>
				<f:facet name="header">#{messages['produto.list.table.title']}</f:facet>
				

				<p:column sortBy="#{bean.codigo}">
					<f:facet name="header">#{messages['produto.label.codigo']}</f:facet>
					<h:outputText value="#{bean.codigo}" />					
				</p:column>

				<p:column sortBy="#{bean.nome}">
					<f:facet name="header">#{messages['produto.label.nome']}</f:facet>
					<h:outputText value="#{bean.nome}" />					
				</p:column>
				
				<p:column>
					<f:facet name="header">Consumo</f:facet>
					<h:outputText value="#{bean.consumo}" >
							<f:convertNumber pattern="#0.000"/>
						</h:outputText>				
				</p:column>
				
				<p:column>
					<f:facet name="header">Consumo acumulado</f:facet>
					<h:outputText value="#{bean.consumoAcumulado}" >
							<f:convertNumber pattern="#0.000"/>
						</h:outputText>				
				</p:column>				
				<p:column>
					<f:facet name="header">% acumulado</f:facet>
					<h:outputText value="#{bean.percentualAcumulado}" >
							<f:convertNumber pattern="#0.00"/>
						</h:outputText>					
				</p:column>				
				<p:column>
					<f:facet name="header">Qualificação</f:facet>
					<h:outputText value="#{bean.qualificacao}" />					
				</p:column>
				<p:column >
					<f:facet name="header">Classificação</f:facet>
					<h:outputText value="#{bean.classificacao}" style="font-weight:bold;background-color:#00ff00;"/>					
				</p:column>

			</p:dataTable>
		</h:form>

	</ui:define>
</ui:composition>